<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Company extends Model
{
    //
    use SoftDeletes;

    public function owners(){
        return $this->belongsToMany(User::class,'company_owners','company_id','user_id');
    }

    public function cafes(){
        return $this->hasMany(Cafe::class,'company_id','id');
    }
}
